{% extends 'admin/base.html' %}
{% block title %}管理员管理{% endblock %}
{% block body %}
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header layuiadmin-card-header-auto">
            {% include 'admin/admin/search.html' %}
        </div>
        <div class="layui-card-body">
            <table id="LAY-app-content-tags" lay-filter="LAY-app-content-tags"></table>
            <div class="layui-form layui-border-box layui-table-view" lay-filter="LAY-table-2"
                 lay-id="LAY-app-content-tags" style=" ">
                <div class="layui-table-box">
                    <div class="layui-table-body layui-table-main">
                        <table border="0" cellpadding="0" cellspacing="0" class="layui-table">
                            <thead>
                            <tr >
                                <th class="jz50" >
                                    ID
                                </th>
                                <th class="jz200" >
                                帐号
                                </th>

                                  <th class="jz200" >
                                最后登陆时间
                                </th>
                                <th class="jz200" >
                                最后登陆IP
                                </th>
                                 <th class="jz100" >
                                    状态
                                </th>
                                 <th class="jz200" >
                           		 操作
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for item in data.items %}

                            <tr  id="tr{{item.id}}"  title="{{item.id}}" >
                                <td  class="jz">
                                   {{item.id}}
                                </td>
                                 <td  class="jz">
                                   {{item.name}}
                                </td>
                                


                                <td  class="jz">
                                    {{item.update}}
                                </td>
                                 <td  class="jz">
                                    {{item.ip}}
                                </td>
                                <td  class="jz">
                                  <a   class="layui-btn layui-btn-primary layui-btn-xs msbtn"   data-title="确定{%if item.status==0%}禁用{%else%}开启{%endif%}吗？" data-url="{{get_url('admin.admin.status')}}?id={{item.id}}&v={{item.status}}"  data-type="action" data-id="{{item.id}}"><i ></i> {%if item.status==0%}<span class="tgreen">开启</span>{%else%}<span class="tred">禁用</span>{%endif%}</a>
                                 </td>
                                <td  class="layui-table-col-special jz" >
                                    <div class="layui-table-cell laytable-cell-2-0-3">
                                        <a
                                                class="layui-btn layui-btn-normal layui-btn-xs msbtn"
                                                data-title="修改内容" data-url="{{get_url('admin.admin.edit')}}?id={{item.id}}"  data-type="edit" data-id="{{item.id}}"><i
                                                class="layui-icon layui-icon-edit"></i>编辑</a>

                                        <a
                                                class="layui-btn layui-btn-danger layui-btn-xs msbtn" data-type="del" data-url="{{get_url('admin.admin.delete')}}?id={{item.id}}" data-title="确定要删除吗？" data-id="{{item.id}}"><i
                                                class="layui-icon layui-icon-delete"></i>删除</a> </div>
                                </td>
                            </tr>
                            {% endfor %}

                            </tbody>
                        </table>
                    </div>

                   {% include 'admin/public/pagelist.html' %}

                </div>
                
            </div>
        </div>
    </div>
</div>

<script src="/static/layui/layui.js"></script>
<script>
    layui.config({
        base: '/static/layui/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index',  'table'], function () {

        var table = layui.table;
	    var k=$(window).width(); //浏览器时下窗口可视区域高度
	    var g=$(window).height(); //浏览器时下窗口可视区域高度

		//查询
        $('.cx').on('click', function () { 
			location.href='{{get_url('admin.admin.index')}}?key='+$("#key").val();
		});

    });
</script>

{% endblock %}